//
//  GasStationCell.m
//  NtoccDriverNew
//
//  Created by niyongsheng on 2022/10/18.
//  Copyright © 2022 GCY. All rights reserved.
//

#import "GasStationCell.h"

@interface GasStationCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconIV;
@property (weak, nonatomic) IBOutlet UILabel *nameL;
@property (weak, nonatomic) IBOutlet UILabel *addressL;
@property (weak, nonatomic) IBOutlet UILabel *distanceL;

@end

@implementation GasStationCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _distanceL.adjustsFontSizeToFitWidth = YES;
}

- (void)setModel:(GasStationModel *)model {
    _model = model;
    
    [_iconIV setImageWithURL:[NSURL URLWithString:model.logoBig] placeholder:[UIImage imageNamed:@"gcy_icon_plaholder"]];
    _nameL.text = model.stationName;
    _addressL.text = model.address;
    _distanceL.text = [NSString stringWithFormat:@"%.2fKM", model.distance.floatValue];
}

@end
